<html>
    <script src="../resources/base.js"></script>
    <script src="nMuxer.js"></script>
    <body>
        <center>
            <video controls="true" id="video"></video>
        </center>
    </body>
    <script>
        const mxi = [
			/*{
			    "url": "nmuxer_video.mp4",
				"bitrate": 1740905,
				"length": 13305561,
				"mime": "video/mp4; codecs=\"avc1.4d401f\"",
				"coreData": {
				    "init": "0-739",
					"index": "740-1143",
				}
			},*/
			{
				"url": "nmuxer_audio.opus",
				"bitrate": 149316,
				"length": 2540202,
				"mime": "audio/webm; codecs=\"opus\"",
				"coreData": {
					"init": "0-258",
					"index": "259-527",
				}
			}
		];
        window.nMuxerInitData = mxi;
        var x = nMuxer(mxi);
        const mainPlayer = document.getElementById("video");
		mainPlayer.src = URL.createObjectURL(x.mediaSource);
		mainPlayer.onerror = function() {
		    console.error(mainPlayer.error);
        }
        window.nMuxerObject = x;
    </script>
</html>